package com.ruoyi.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum ProjectTaskType {

    ALL("ALL","所有"),
    INCOMPLETE("INCOMPLETE","未完成"),
    COMPLETE("COMPLETE","已完成"),
    REJECT("REJECT","被拒绝"),
    ;

    private String value;
    private String name;

    public static ProjectTaskType valuesOf(String value) {
        //获取所有枚举集合
        ProjectTaskType[] es = values();
        for (ProjectTaskType e : es) {
            if (Objects.equals(e.getValue(), value)) {
                return e;
            }
        }
        return null;
    }
}
